package Pojo;

import java.util.Objects;

//用户实体类
public class User {
    private Integer uid;//用户id(主键)
    private String user_name;//用户名称
    private String user_phone;//用户手机号
    private String user_password;//用户密码

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", user_name='" + user_name + '\'' +
                ", user_phone='" + user_phone + '\'' +
                ", user_password='" + user_password + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(uid, user.uid) &&
                Objects.equals(user_name, user.user_name) &&
                Objects.equals(user_phone, user.user_phone) &&
                Objects.equals(user_password, user.user_password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, user_name, user_phone, user_password);
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getUser_phone() {
        return user_phone;
    }

    public void setUser_phone(String user_phone) {
        this.user_phone = user_phone;
    }

    public String getUser_password() {
        return user_password;
    }

    public void setUser_password(String user_password) {
        this.user_password = user_password;
    }

    public User(Integer uid, String user_name, String user_phone, String user_password) {
        this.uid = uid;
        this.user_name = user_name;
        this.user_phone = user_phone;
        this.user_password = user_password;
    }
}
